<%@ page pageEncoding='UTF-8'%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:set var="contextPath" value="#request.get('javax.servlet.forward.context_path')" scope="request" />
<!DOCTYPE html>
<head>
    <title>Edit Assistant Details</title>
    <%-- header --%>
    <jsp:include page="/WEB-INF/content/common/Header.jsp" flush="true"/>
    <script src="${contextPath}/js/jquery/jquery.validate.js"></script>
    <script src="${contextPath}/js/jquery/jquery.maskedinput.min.js"></script>
	<script src="${contextPath}/js/assistant/assistant.js"></script>
</head>
<body class="metro home">
	<%-- tob-bar --%>
    <jsp:include page="/WEB-INF/content/common/TopBar.jsp" flush="true"/>
       	
	<div id="main-container" class="body-wrapper">
        <%-- tob-container --%>
    	<jsp:include page="/WEB-INF/content/common/TopContainer.jsp" flush="true"/>
        
    	<div id="body-container">
        	<div id="assistant-edit-form-container" class="form-container">
        		<%-- header-container --%>
        		<s:set var="mode" value="'edit'"/>
    			<jsp:include page="/WEB-INF/content/assistant/AssistantMenuContainer.jsp" flush="true"/>
    	
                <div class="form-body-container">
	        		<form id="assistant-edit-form" class="edit-form assistant-form" action="${contextPath}/assistant/update" method="post">
	                	<input type="hidden" name="guiAssistant.userId" value="${guiAssistant.userId}" />
	                	<fieldset>
	                    	<legend>Edit Assistant</legend>
	                        <label>Name<em class="text-alert">*</em></label>
	                        <div class="input-control text">
	                        	<input type="text" name="guiAssistant.name" value="${guiAssistant.name}" placeholder="input text" required/>
	                            <button class="btn-clear"></button>
							</div>
	                        <label>Type</label>
	                        <div>
	                        	<input type="hidden" name="guiAssistant.type" value="ASSISTANT" placeholder="input text"/>
	                            <div class="input-control text">
	    							<input type="text" value="" placeholder="Assistant" disabled/>
	    							<button class="btn-clear"></button>
								</div>
							</div>
	                        <label>Qualification<em class="text-alert">*</em></label>
	                        <div class="input-control text">
	                        	<input type="text" name="guiAssistant.qualifications" value="${guiAssistant.qualifications}" placeholder="input text"/>
	                            <button class="btn-clear"></button>
							</div>
	                        <label>Other</label>
	                        <div class="input-control text">
	                        	<input type="text" name="guiAssistant.others" value="${guiAssistant.others}" placeholder="input text"/>
	                            <button class="btn-clear"></button>
							</div>
							<label>Telephone</label>
							<div>
								<div class="input-control text">
		                        	<input type="text" name="guiAssistant.contact.telNo" value="${guiAssistant.contact.telNo}" placeholder="input number" class="required user-contact"/>
		                            <button class="btn-clear"></button>
								</div>
							</div>
							<label>Address</label>
	                    	<div>
								<div class="input-control text">
		                        	<input type="text" name="guiAssistant.contact.address" value="${guiAssistant.contact.address}" placeholder="input address" class="required"/>
		                            <button class="btn-clear"></button>
								</div>		
							</div>
	                        <div>
	                        <label>Admin</label>
								<div>
									<div class="input-control radio default-style" data-role="input-control">
										<label>
										<s:if test="%{guiAssistant.admin}">
											<input type="radio" name="guiAssistant.admin" value="true" checked="checked"/>
										</s:if>
										<s:else>
											<input type="radio" name="guiAssistant.admin" value="true"/>
										</s:else>
										<span class="check"></span> Yes
										</label>
									</div>
									<div class="input-control radio default-style" data-role="input-control">
										<label>
										<s:if test="%{guiAssistant.admin}">
											<input type="radio" name="guiAssistant.admin" value="false"/>
										</s:if>
										<s:else>
											<input type="radio" name="guiAssistant.admin" value="false" checked="checked"/>
										</s:else>
											<span class="check"></span> No
										</label>
									</div>
								</div>      
							</div>
	                        <div class="form-button-container">
								<a onClick="document.forms['assistant-edit-form'].submit(); return false;">
		                        	<div class="form-button tile half-vertical subheader-secondary bg-cobalt fg-white">
				                        update <i class="icon-spin on-right smaller"></i>
		                        	</div>
								</a>
								<a href="${contextPath}">
		                          	<div class="form-button tile half-vertical subheader-secondary bg-cyan fg-white">
		                            	cancel <i class="icon-cancel-2 on-right smaller"></i>
		                           	</div>
								</a>
	                        </div>
	        			</fieldset>
	        		</form>
                </div>
                <br clear="all"/>
    		</div>    
    	</div>
        
        <%-- bottom-container --%>
    	<jsp:include page="/WEB-INF/content/common/BottomContainer.jsp" flush="true"/>
        
	</div>
    
    <%-- footer-container --%>
    <jsp:include page="/WEB-INF/content/common/FooterContainer.jsp" flush="true"/>
    
</body>
</html>